package com.xiaozhu.common.toggle;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.xiaozhu.common.R;
import com.xiaozhu.library.entity.EventBusEntity;
import com.xiaozhu.library.fragment.BaseFragment;

/**
 * @说明
 * @作者 LY
 * @时间 2017/12/21 14:47
 * @邮箱 2743569843@qq.com
 * @版权 Copyright(c) 2017 LY-版权所有
 * @备注
 */
public class SwitchFragment extends BaseFragment {
    private TextView tvName;


    public static SwitchFragment newInstance(String name) {
        SwitchFragment fragment = new SwitchFragment();
        Bundle args = new Bundle();
        args.putString("name", name);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void initView(View view) {
        tvName = view.findViewById(R.id.tvName);
    }

    @Override
    public void business() {
        tvName.setText(getArguments().getString("name"));
    }

    @Override
    public int getLayoutResID() {
        return R.layout.fragment_switch;
    }

    @Override
    public void onEventBus(EventBusEntity eventBusEntity) {

    }
}
